<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!-- 二级菜单  -->
<div class="sidebar-nav">
    <div class="nav-canvas">
        <div class="user-panel ">
           <%@include file="../public/loginInfo.jsp"%>
        </div>
        <ul id="menuUl" class="nav nav-pills nav-stacked main-menu">
            <li name="department" style="display:none;" class="nav-header">
                <a href="<%=basePath%>mgr/department/department.jsp">
                    <span class="glyphicon glyphicon-home" aria-hidden="true"></span>
                                        部门管理
                </a>
            </li>
            <li name="duties" style="display:none;" class="nav-header" >
                <a href="<%=basePath%>mgr/department/duties.jsp">
                    <span class="glyphicon glyphicon-bookmark" aria-hidden="true"></span>
                                        职务管理
                </a>
            </li>
             <li name="employee" style="display:none;" class="nav-header" >
                <a href="<%=basePath%>mgr/department/employee.jsp">
                    <span class="glyphicon glyphicon-user" aria-hidden="true"></span>
                                        员工管理
                </a>
            </li>
            <li name="attendance" style="display:none;" class="nav-header">
                <a href="<%=basePath%>mgr/department/attendance.jsp">
                    <span class="glyphicon glyphicon-hdd" aria-hidden="true"></span>
                                        考勤管理
                </a>
            </li>
        </ul>
    </div>
</div>
<script>
var submenu={
	startEvent:function(){
	},
	
	init:function(){
		submenu.startEvent();
	}
}
$(document).ready(function() {
	submenu.init();

	typeAndFlag=typeAndFlag.substring(0,typeAndFlag.length-1);
	var typeAndFlags=typeAndFlag.split(',');
	//控制二级菜单 
	for(var i=0;i<typeAndFlags.length;i++){
		var type=typeAndFlags[i].split(';')[0];
		var flag=typeAndFlags[i].split(';')[1];
		if(type==2){
			if(flag){
				$('#menuUl li').each(function(idx,obj){
					if($(obj).attr('name')==flag){
						$(obj).css('display','');
					}
				});
			}
		}
	}
});
</script>